Home:ALL Converter>IPython console in spyder extremely slow in Anaconda

IPython console in spyder extremely slow in Anaconda

Ask Time:2018-11-20T03:28:31         Author:andbeonetraveler

Json Formatter

I'm trying Anaconda/Spyder after using the standard python installation/IDLE for several years. The console (and variable explorer) becomes progressively slower during each work session, with every script and interactive command that I run. Eventually it takes minutes to get a response to simple commands like print, and then it stops responding completely and I shut it down. It's pretty disruptive to my work.

Mac OSX 10.13.6

conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0

qt 5.9.6
spyder 3.3.1 
ipython 7.1.1

I do use matplotlib frequently. Whenever possible I use plt.ioff() at the beginning of a script and/or plt.close('all') at the end. Turning off matplotlib support completely in preferences doesn't help and it's not a permanent fix anyway. Python is not using anywhere near all my CPU or RAM.

Author:andbeonetraveler,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53381373/ipython-console-in-spyder-extremely-slow-in-anaconda
JJR4 :

So this is not a totally satisfying solution but it seems to be a reasonable temporary fix. If you downgrade your spyder version to 3.1.X you will be able to use the python console rather than the Ipython console, and this seems to work for me. To do this just run: \n\nconda install spyder=3.1\n\n\nin the terminal while your environment of choice is active. This is not ideal, because the developers removed the python console for a specific reason as mentioned in this question, How to add python console in spyder. \nAdditionally downgrading this much may have unforeseen effects on other packages your code uses and may cause other issues but so far this is the only solution I was able to come up with. ",
2018-11-21T15:32:17
Félix Chénier :

@Sjoerd Thanks for your answer, this is what worked for me. To be still clearer, here's what I did in terminal on Anaconda 3 on High Sierra:\n\necho "ipykernel 4.10.0" >> ~/anaconda3/conda-meta/pinned\nconda update anaconda\n\nWhen I tried to update only ipykernel, I would have dependencies errors. By updating anaconda, everything is now up to date but ipykernel which is effectively at version 4.10.0. I didn't experience any hang since then.",
2019-08-23T01:09:58
Sjoerd :

As far as I've found out, the problem seems to be with the latest major release of the ipython kernel. Pinning the version of ipykernel to 4.10.0 solved it for me. To do so, add a line containing ipykernel 4.* to the file ~/anaconda3/conda-meta/pinned. Create the file if it does not exist yet. Then conda update ipykernel which will actually downgrade to 4.10.0. Worked for me!",
2018-12-02T12:14:17
Artur Nowicki :

you don't need to downgrade the entire spyder.\nFor me it worked with downgrading these two:\n\nconda install ipython=6.4.0\nconda install ipykernel=4.10.0\n",
2019-03-30T11:17:33
yy